package vip.george.p1672;

public class P1672 {


    public int maximumWealth(int[][] accounts) {
        int maxWeight = 0;

        for (int i = 0; i < accounts.length; i++) {
            int sum = 0;
            for (int j = 0; j < accounts[i].length; j++) {
                sum += accounts[i][j];
            }
            maxWeight = Math.max(maxWeight, sum);
        }
        return maxWeight;
    }

    public static void main(String[] args) {
        P1672 p = new P1672();
        System.out.println(p.maximumWealth(new int[][]{{1,2,3},{3,2,1}}));
        System.out.println(p.maximumWealth(new int[][]{{1,5},{7,3},{3,5}}));
    }
}
